import App from './App.vue'
import store from 'tools/store/index.js'
import http from 'tools/request'
import HeartBeatPopup from '@/components/HeartbeatPopup/index.vue'
import util from 'utils/utils.js'
import config from 'config/config.js'
import TIM from 'tim-wx-sdk';
import TIMUploadPlugin from 'tim-upload-plugin';
Vue.prototype.$TIM = TIM
Vue.prototype.$TIMUploadPlugin = TIMUploadPlugin

// #ifndef VUE3
import Vue from 'vue'
Vue.prototype.$utils = util
Vue.config.productionTip = false
Vue.prototype.$config = config
App.mpType = 'app'
import uView from "uview-ui";
Vue.use(uView);

// 挂载
Vue.prototype.$http = http;
// 注册全局组件
   
Vue.component('heart-beat-popup', HeartBeatPopup)

import {
	router,
	RouterMount
} from './tools/router/router.js'
//引入路由
Vue.use(router);


const app = new Vue({
	store,
	...App
})
// #ifdef H5
RouterMount(app, router, "#app");
// #endif
// #ifndef H5
app.$mount();
// #endif
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif
